Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 5 - Sequence Grabber Components / Sequence Grabber Components Reference
Sequence Grabber Component Functions / Configuring Sequence Grabber Components


SGNewChannel

The SGNewChannel function creates a sequence grabber channel and assigns a channel component to the channel. The channel component is responsible for providing digitized data to the sequence grabber component. You specify the type of channel component to be added to the sequence grabber component.

pascal ComponentResult SGNewChannel (SeqGrabComponent s, 
                                     OSType channelType,
                                     SGChannel *ref);
s
Specifies the component instance that identifies your connection to the sequence grabber component. You obtain this value from the Component Manager's OpenDefaultComponent or OpenComponent function.
channelType
Specifies the type of channel to open. This value corresponds to the component subtype value of the channel component. The following values are valid:
VideoMediaType
Video channel
SoundMediaType
Sound channel
ref
Contains a pointer to the frameChannel field in the sequence grabber information structure that is to receive a reference to the channel that is added to the sequence grabber component. If the sequence grabber component successfully locates and connects to an appropriate
channel component, the sequence grabber component returns a reference to the channel component into the field referred to by this parameter. If the sequence grabber component cannot open a connection, it sets the result code to a nonzero value.
DESCRIPTION
The sequence grabber component locates, and attempts to connect to, an appropriate channel component. If the sequence grabber component cannot locate or connect to
a channel component, it returns a nonzero result code.

RESULT CODES
couldntGetRequiredComponent-9405Component not found
Memory Manager errors

SEE ALSO
When you are done with the sequence grabber component, you can dispose of the channels you have used by calling the SGDisposeChannel function, which is described on page 5-32. However, when you close the sequence grabber component, it automatically disposes of all its channels, so this function is usually unnecessary.

If you want to use a specific channel component, you may use the SGNewChannelFromComponent function, which is described next.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help